
The files "Cat2h_c.sd" and "Cat2h_h.sd" contains source descriptors that
generates code similar to the one generated by Cat2h by Nico François (and
also Cat2Inc by Magnus Holmgren ;). It uses a somewhat different approach
to string handling, that is small and fast.

Rather than storing all string in an array, and scan that one each time
(like CatComp normally does; there are ways around that though), the first
two bytes of a string contains the ID. The "GetString" function, which
takes a string as argument, then only reads these two bytes into a long
word, and the string ID and default string is then known.

As of version 1.9, FlexCat is capable of generating that kind of output,
using the %a command. The included files actually use %2a, and thus, only
two ID bytes per string are generated (like Cat2h does). This should be
enough for most applications. If you change the length, remember that the
GetString() function need to be changed accordingly.

The generated header file defines all strings, and the source file contains
code to open/close the catalog (with autoinit code for SAS/C and DICE), and
a suitable GetString function. A quick look at the generated code should be
enough to gather all the details, I think.

The code does currently not support multiple catalogs, nor change of
version number and builtin language.  Easy to add though (e.g.  by using
%b for all names (and references) needed to be unique e.g. Get%bString() etc),
should the need arise.


Magnus Holmgren <cmh@lls.se>

$Id: Cat2h.readme,v 1.2 1999/11/28 03:36:41 carlos Exp $

